// pages/author/author.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        Height: null,
        Width: null,
        hotArr: [
            {
                id: 1,
                imgUrl: 'http://lengnuanit.top/images/orther/author/headers4.png',
                type: '刘慈欣',
                follow: 0,
            },
            {
                id: 2,
                imgUrl: 'http://lengnuanit.top/images/orther/author/headers5.png',
                type: '田小花',
                follow: 1,

            },
            {
                id: 3,
                imgUrl: 'http://lengnuanit.top/images/orther/author/headers6.png',
                type: '马尔克斯',
                follow: 1,

            },
            {
                id: 4,
                imgUrl: 'http://lengnuanit.top/images/orther/author/headers7.png',
                type: '余秋雨',
                follow: 0,

            }
        ],
        otherArr: [
            {
                id: 1,
                imgUrl: 'http://lengnuanit.top/images/orther/author/headers8.png',
                type: '刘慈欣',
                follow: 0,
            },
            {
                id: 2,
                imgUrl: 'http://lengnuanit.top/images/orther/author/headers9.png',
                type: '田小花',
                follow: 1,

            },
            {
                id: 3,
                imgUrl: 'http://lengnuanit.top/images/orther/author/headers10.png',
                type: '马尔克斯',
                follow: 1,

            },
            {
                id: 4,
                imgUrl: 'http://lengnuanit.top/images/orther/author/headers11.png',
                type: '余秋雨',
                follow: 0,

            }
        ],
        emergingArr: [
            {
                id: 1,
                imgUrl: 'http://lengnuanit.top/images/orther/author/headers3.png',
                type: '刘慈欣',
                follow: 0,
            },
            {
                id: 2,
                imgUrl: 'http://lengnuanit.top/images/orther/author/headers10.png',
                type: '田小花',
                follow: 1,

            },
            {
                id: 3,
                imgUrl: 'http://lengnuanit.top/images/orther/author/headers6.png',
                type: '马尔克斯',
                follow: 1,

            },
            {
                id: 4,
                imgUrl: 'http://lengnuanit.top/images/orther/author/headers9.png',
                type: '余秋雨',
                follow: 0,

            }
        ]
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        wx.setNavigationBarTitle({ title: '读者' })

        this.getWidthOrHeight()
    },
    getWidthOrHeight() {
        const that = this
        wx.getSystemInfo({
            success(res) {
                that.setData({
                    Height: res.windowHeight,
                    Width: res.windowWidth
                })
            },
        })
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {

    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {

    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {

    }
})